//供应商列表页面接口
import request from '@/utils/axios-req'

//查询供应商列表
export const suppliersSelectlist = (query) => {
  return request({
    url: '/admin/suppliers/search',
    method: 'get',
    params: query
  })
}
//供应商添加
export const suppliersadd = (query) => {
  return request({
    url: '/admin/suppliers/addSupplier',
    method: 'post',
    data: query
  })
}

//供应商删除
export const suppliersdelete = (id) => {
  return request({
    url: `/admin/suppliers/deleteSupplier/${id}`,
    method: 'delete'
  })
}

//供应商修改
export const suppliersedit = (query) => {
  return request({
    url: '/admin/suppliers/update',
    method: 'put',
    data: query
  })
}
//供应商导入
export const suppliersimports = (query) => {
  return request({
    url: '/admin/importOrder',
    method: 'post',
    data: query
  })
}
//供应商下载模板
export const suppliersTemplate = (query) => {
  return request({
    url: '/admin/exportOrderTemplate',
    method: 'get',
    params: query
  })
}
